﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage1.master" AutoEventWireup="true" CodeFile="dba.aspx.cs" Inherits="dba" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style2
        {
            text-align: right;
        }
        .style3
        {
            text-align: right;
            height: 25px;
        }
        .style4
        {
            height: 25px;
            width: 97px;
        }
        .style5
        {
            width: 97px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
       
        
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
            ContextTypeName="DataClassesDataContext" EntityTypeName="" TableName="product">
        </asp:LinqDataSource>
        <asp:Label ID="Label1" runat="server" Text="产品管理"></asp:Label>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataKeyNames="shop_sign" DataSourceID="LinqDataSource1" 
            ForeColor="#333333" GridLines="None" style="text-align: center" 
            Width="100%" AllowPaging="True" PageSize="5">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="产品名" SortExpression="product_name">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("product_name") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox6" runat="server" style="text-align: center" 
                            Text='<%# Bind("product_name") %>'></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="厂家" SortExpression="manufacturer">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("manufacturer") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox7" runat="server" style="text-align: center" 
                            Text='<%# Bind("manufacturer") %>'></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="牌号" SortExpression="shop_sign">
                    <EditItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("shop_sign") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox8" runat="server" style="text-align: center" 
                            Text='<%# Bind("shop_sign") %>'></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="类型" SortExpression="type">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("type") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox9" runat="server" style="text-align: center" 
                            Text='<%# Bind("type") %>'></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="单价" SortExpression="price">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("price") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox10" runat="server" style="text-align: center" 
                            Text='<%# Bind("price") %>'></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="库存" SortExpression="inventory">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("inventory") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox11" runat="server" style="text-align: center" 
                            Text='<%# Bind("inventory") %>'></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="选择">
                    <EditItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" />
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <SortedAscendingCellStyle BackColor="#FDF5AC" />
            <SortedAscendingHeaderStyle BackColor="#4D0000" />
            <SortedDescendingCellStyle BackColor="#FCF6C0" />
            <SortedDescendingHeaderStyle BackColor="#820000" />
        </asp:GridView>
        <asp:CheckBox ID="CheckBox2" runat="server" 
            oncheckedchanged="CheckBox2_CheckedChanged" Text="全选" />
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="确认修改" />
        <asp:Button ID="Button3" runat="server" onclick="Button3_Click" Text="确认删除" />
        <br />
        <asp:Label ID="Label2" runat="server" Text="产品录入"></asp:Label>
        <br />
        <table class="style1">
            <tr>
                <td style="text-align: right" width="45%">
                    <asp:Label ID="Label3" runat="server" Text="产品名："></asp:Label>
                </td>
                <td class="style5">
                    <asp:TextBox ID="TextBox12" runat="server"></asp:TextBox>
                </td>
                <td rowspan="7">
                    <asp:Image ID="Image1" runat="server" Height="155px" Width="168px" />
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <asp:Label ID="Label4" runat="server" Text="厂家："></asp:Label>
                </td>
                <td class="style5">
                    <asp:TextBox ID="TextBox13" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <asp:Label ID="Label5" runat="server" Text="牌号："></asp:Label>
                </td>
                <td class="style5">
                    <asp:TextBox ID="TextBox14" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <asp:Label ID="Label6" runat="server" Text="类型："></asp:Label>
                </td>
                <td class="style5">
                    <asp:TextBox ID="TextBox15" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    <asp:Label ID="Label7" runat="server" Text="单价："></asp:Label>
                </td>
                <td class="style4">
                    <asp:TextBox ID="TextBox16" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <asp:Label ID="Label8" runat="server" Text="库存："></asp:Label>
                </td>
                <td class="style5">
                    <asp:TextBox ID="TextBox17" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td  colspan="2" style="text-align: right">
            <asp:FileUpload ID="FileUpload1" runat="server" />
                    <asp:Button ID="Button4" runat="server" onclick="Button4_Click" Text="确认" />
                </td>
            </tr>
            <tr>
                <td  colspan="2" style="text-align: right">
            <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="确认录入" 
            Height="21px" />
                </td>
                <td style="text-align: center">
                    &nbsp;</td>
            </tr>
            </table>
        <br />
        <br />
        <br />
        </ContentTemplate>
</asp:Content>

